﻿// ------------------------------------------------------------------------------
// <copyright file="SematicZoomFlipView.cs" company="skumaronline.com">
//    Copyright (C) 2012 Suresh Kumar T.
//
//    This program is free software; you can redistribute it and/or
//    modify it under the terms of the GNU General Public License
//    as published by the Free Software Foundation version 2
//    of the License.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    http://www.gnu.org/licenses/gpl-2.0.html
//
// </copyright>
// ------------------------------------------------------------------------------

namespace StoreAppLib.Controls
{
    using Windows.UI.Xaml.Controls;

    /// <summary>
    /// FlipView control that can be used as SematicView child
    /// </summary>
    public sealed class SematicZoomFlipView : FlipView, ISemanticZoomInformation
    {
        /// <summary>
        /// A value that indicates whether the implementing view is the active view.
        /// </summary>
        private bool isActiveView;

        /// <summary>
        /// A value that indicates whether the implementing view is the semantically more complete zoomed-in view.
        /// </summary>
        private bool isZoomedInView;

        /// <summary>
        /// The SemanticZoom owner that hosts the implementing view.
        /// </summary>
        private SemanticZoom semanticZoomOwner;

        /// <summary>
        /// Gets or sets a value indicating whether the implementing view is the  active view.
        /// </summary>
        public bool IsActiveView
        {
            get
            {
                return this.isActiveView;
            }

            set
            {
                this.isActiveView = value;
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether if the implementing view is the active view.
        /// </summary>
        public bool IsZoomedInView
        {
            get
            {
                return this.isZoomedInView;
            }

            set
            {
                this.isZoomedInView = value;
            }
        }

        /// <summary>
        /// Gets or sets the SemanticZoom owner that hosts the implementing view.
        /// </summary>
        public SemanticZoom SemanticZoomOwner
        {
            get
            {
                return this.semanticZoomOwner;
            }

            set
            {
                this.semanticZoomOwner = value;
            }
        }

        /// <summary>
        /// Changes related aspects of presentation (such as scrolling UI or state) when the overall view for a SemanticZoom changes.
        /// </summary>
        public void CompleteViewChange()
        {
        }

        /// <summary>
        /// Completes item-wise operations related to a view change when the implementing view is the source view and the new view is a potentially different implementing view.
        /// </summary>
        /// <param name="source">The view item as represented in the source view.</param>
        /// <param name="destination">The view item as represented in the destination view.</param>
        public void CompleteViewChangeFrom(SemanticZoomLocation source, SemanticZoomLocation destination)
        {
        }

        /// <summary>
        /// Completes item-wise operations related to a view change when the implementing view is the destination view and the source view is a potentially different implementing view.
        /// </summary>
        /// <param name="source">The view item as represented in the source view.</param>
        /// <param name="destination">The view item as represented in the destination view.</param>
        public void CompleteViewChangeTo(SemanticZoomLocation source, SemanticZoomLocation destination)
        {
        }

        /// <summary>
        /// Initializes the changes to related aspects of presentation (such as scrolling UI or state) when the overall view for a SemanticZoom is about to change.
        /// </summary>
        public void InitializeViewChange()
        {
        }

        /// <summary>
        /// Forces content in the view to scroll until the item specified by SemanticZoomLocation is visible. Also focuses that item if found.
        /// </summary>
        /// <param name="item">The item in the view to scroll to.</param>
        public void MakeVisible(SemanticZoomLocation item)
        {
        }

        /// <summary>
        /// Initializes item-wise operations related to a view change when the implementing view is the source view and the pending destination view is a potentially different implementing view.
        /// </summary>
        /// <param name="source">The view item as represented in the source view.</param>
        /// <param name="destination">The view item as represented in the destination view.</param>
        public void StartViewChangeFrom(SemanticZoomLocation source, SemanticZoomLocation destination)
        {
        }

        /// <summary>
        /// Initializes item-wise operations related to a view change when the source view is a different view and the pending destination view is the implementing view.
        /// </summary>
        /// <param name="source">The view item as represented in the source view.</param>
        /// <param name="destination">The view item as represented in the destination view.</param>
        public void StartViewChangeTo(SemanticZoomLocation source, SemanticZoomLocation destination)
        {
        }
    }
}